﻿@model List<CSharpDay11__Entity_Framework_.Models.ArtistViewModel>
<br />
@foreach (var a in Model)
{
    <div class="well container ">
        <div class="row ">
            <div class="col-sm-4 col-sm-offset-4 text-center">
                <img src="@a.ImageUrl" class="artist-img img-rounded" />
            </div>
        </div>
        <div class="row artist">
            <div class="col-sm-12 text-center">
                <h4><i>Name: </i>@a.Name</h4>
                <i>Alive? </i>
                @{
    if (a.IsAlive)
    {
        @:<span>Yes</span>
                    }
    else
    {
        @:<span>No</span>
                    }
                }
                <br /> <!--End of IsAlive-->
                @Html.ActionLink("Details", "ArtistDetails", new { id = @a.Id }, new { @class = "btn btn-info" })
                @Html.ActionLink("Delete", "DeleteArtist", new { id = a.Id }, new { @class = "btn btn-large btn-danger" })
            </div>
        </div>
        <div class="row">
            @foreach (var art in a.Artworks)
            {
                <div class="panel panel-info col-sm-4">

                    <div class="panel-heading">@Html.ActionLink(art.Title, "ArtworkDetails", new { id = art.Id })</div>
                    <div class="panel-body">
                        <img src="@art.ImageUrl" class="img-responsive img-rounded" />
                    </div>
                    <div class="panel-footer">
                        <label class="label label-primary">Value: $</label>@art.Worth.ToString("$#,##0.00")
                    </div>
                </div>
            }
        </div>



    </div>

}